/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package BLL;

import DAL.DALOrderDetail;
import DTO.DTOOrderDetail;
import DTO.DTOStatisticSold;
import java.util.ArrayList;

/**
 *
 * @author Pham
 */
public class BLLOrderDetail {
    DALOrderDetail dalOrdDetail;
    
    public BLLOrderDetail(){
        dalOrdDetail = new DALOrderDetail();
    }
    
    public ArrayList<DTOOrderDetail> getOrdDetailbyID(String OrderId){
        return dalOrdDetail.getOrderDetailsbyId(OrderId);
    }
    
    //method get all order has execute export
    public ArrayList<DTOOrderDetail> getOrderHasExport()
    {
        return dalOrdDetail.getOrderHasExport();
    }
    
    //method statistic number of products have sold
    public ArrayList<DTOStatisticSold> statisticProductHasSold(int month, int year, String order)
    {
        return dalOrdDetail.statisticProductHasSold(month, year, order);
    }
    
    public boolean createOrderDetail(DTOOrderDetail dtoDetail)
    {
        return dalOrdDetail.createOrdDetail(dtoDetail);
    }
    
    //method delete orderDetail
    public boolean deleteOrderDetail(String orderId)
    {
        return dalOrdDetail.deleteOrdDetail(orderId);
    }
}
